<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Apache module mod_asis</TITLE>
</HEAD>

<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<BODY
 BGCOLOR="#FFFFFF"
 TEXT="#000000"
 LINK="#0000FF"
 VLINK="#000080"
 ALINK="#FF0000"
>
<!--#include virtual="header.html" -->

<H1 ALIGN="CENTER">Module mod_asis</H1>

This module is contained in the <CODE>mod_asis.c</CODE> file, and
is compiled in by default. It provides for <CODE>.asis</CODE> files. Any
document with mime type <CODE>httpd/send-as-is</CODE> will be processed by
this module.
<!--%plaintext &lt;?INDEX {\tt httpd/send-as-is} mime type&gt; -->

<H2>Purpose</H2>
To allow file types to be defined such that Apache sends them without
adding HTTP headers.<P>

This can be used to send any kind of data from the server, including redirects
and other special HTTP responses, without requiring a cgi-script or an nph
script.
<H2>Usage</H2>
In the server configuration file, define a new mime type called
<CODE>httpd/send-as-is</CODE> <EM>e.g.</EM>
<BLOCKQUOTE><CODE>AddType httpd/send-as-is asis</CODE></BLOCKQUOTE>
this defines the <CODE>.asis</CODE> file extension as being of the new
<CODE>httpd/send-as-is</CODE> mime type. The contents of any file with a
<CODE>.asis</CODE> extension will then be sent by Apache to the client with
almost no changes. Clients will need HTTP headers to be attached, so do not
forget them. A Status: header is also required; the data should be the
3-digit HTTP response code, followed by a textual message.<P>

Here's an example of a file whose contents are sent <EM>as is</EM> so as to
tell the client that a file has redirected.
<BLOCKQUOTE><CODE>
Status: 301 Now where did I leave that URL <BR>
Location: http://xyz.abc.com/foo/bar.html <BR>
Content-type: text/html <BR>
<BR>
&lt;HTML&gt; <BR>
&lt;HEAD&gt; <BR>
&lt;TITLE&gt;Lame excuses'R'us&lt;/TITLE&gt; <BR>
&lt;/HEAD&gt; <BR>
&lt;BODY&gt; <BR>
&lt;H1&gt;Fred's exceptionally wonderful page has moved to <BR>
&lt;A HREF="http://xyz.abc.com/foo/bar.html"&gt;Joe's&lt;/A&gt; site.  <BR>
&lt;/H1&gt; <BR>
&lt;/BODY&gt; <BR>
&lt;/HTML&gt;
</CODE></BLOCKQUOTE>
Notes: the server always adds a Date: and Server: header to the data returned
to the client, so these should not be included in the file.
The server does <EM>not</EM> add a Last-Modified header; it probably should.
<P>

<!--#include virtual="footer.html" -->
</BODY>
</HTML>
